package com.xyz.study.design_mode.h_abstract_factory;

import com.xyz.study.design_mode.h_abstract_factory.mode.ConcreteFactory;
import com.xyz.study.design_mode.h_abstract_factory.mode.Factory;
import com.xyz.study.design_mode.h_abstract_factory.mode.ProductA;
import com.xyz.study.design_mode.h_abstract_factory.mode.ProductB;

/**
 * 生成实例：其三 ---- AbstractFactory抽象工厂模式
 * 角色：Client 委托者
 * @author XYZ
 * @version 1.0.0
 * @since 2020/6/22
 */
public class AbstractFactoryMain {

    public static void main(String[] args) {
        Factory concreteFactory = new ConcreteFactory();
        ProductA productA = concreteFactory.createProductA();
        ProductB productB = concreteFactory.createProductB();
        productA.execute();
        productB.use();
    }
}
